/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Model;

/**
 *
 * @author jase
 */
public class Error {

	private String fileName;
	private int lineNumber;
	private String message;

	public static final Error NONE = new Error("none",-1,"");
	public static final Error UNKNOWN = new Error("unknown",-2,"");
	public static final Error BLANK = new Error("blank",-1,"");

	public Error(String n, int l, String m) {
		fileName = n;
		lineNumber = l;
		message = m;
	}

	public String getFileName() {
		return fileName;
	}

	public int getLineNumber() {
		return lineNumber;
	}

	public String getMessage() {
		return message;
	}

	public boolean equals(Object other) {
		Error err = (Error) other;
		return fileName.equals(err.getFileName()) && lineNumber == err.getLineNumber();
	}
}
